<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>父级元素节点</title>
</head>
<div class="demo">
  <div class="box">
    <span class="children">children node</span>
  </div>
</div>
<script>
  // 1. 父节点 parentNode
  const children = document.querySelector('.children');
  // var box = document.querySelector('.box');
  // 得到的是离元素最近的父级节点(亲爸爸) 如果找不到父节点就返回为 null
  console.log(children.parentNode);
</script>

</html>
